package com.lb.shopguide.entity.order;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by kang on 2017/6/15.
 */

public class GoodsInOrderBean implements Parcelable {
    /**
     * "productSum": 1,
     * "color": "粉红色",
     * "size": "XXL",
     * "price": 0.02,
     * "productPicUrl": "http://static.storeer.com/wlwb/product/a4552a97-ac73-4033-9ae1-e12b8e891b35_580x580.jpeg",
     * "productName": "哆啦A梦儿童滋养洗发沐浴露(2合1) 500ml"\
     * discountPrice
     */
    private int productSum;
    private String color;
    private String size;
    private String price;
    private String productPicUrl;
    private String productName;
    private String productCode;
    private String skuCode;
    private String orderDetailCode;
    private String discountPrice;

    private boolean notValid;

    public GoodsInOrderBean() {

    }

    protected GoodsInOrderBean(Parcel in) {
        productSum = in.readInt();
        color = in.readString();
        size = in.readString();
        price = in.readString();
        productPicUrl = in.readString();
        productName = in.readString();
        productCode = in.readString();
        skuCode = in.readString();
        orderDetailCode = in.readString();
        discountPrice = in.readString();
        notValid = in.readByte() != 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(productSum);
        dest.writeString(color);
        dest.writeString(size);
        dest.writeString(price);
        dest.writeString(productPicUrl);
        dest.writeString(productName);
        dest.writeString(productCode);
        dest.writeString(skuCode);
        dest.writeString(orderDetailCode);
        dest.writeString(discountPrice);
        dest.writeByte((byte) (notValid ? 1 : 0));
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<GoodsInOrderBean> CREATOR = new Creator<GoodsInOrderBean>() {
        @Override
        public GoodsInOrderBean createFromParcel(Parcel in) {
            return new GoodsInOrderBean(in);
        }

        @Override
        public GoodsInOrderBean[] newArray(int size) {
            return new GoodsInOrderBean[size];
        }
    };

    public int getProductSum() {
        return productSum;
    }

    public void setProductSum(int productSum) {
        this.productSum = productSum;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public String getSize() {
        return size;
    }

    public void setSize(String size) {
        this.size = size;
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public String getProductPicUrl() {
        return productPicUrl;
    }

    public void setProductPicUrl(String productPicUrl) {
        this.productPicUrl = productPicUrl;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getDiscountPrice() {
        return discountPrice;
    }

    public void setDiscountPrice(String discountPrice) {
        this.discountPrice = discountPrice;
    }

    public String getProductCode() {
        return productCode;
    }

    public void setProductCode(String productCode) {
        this.productCode = productCode;
    }

    public String getSkuCode() {
        return skuCode;
    }

    public void setSkuCode(String skuCode) {
        this.skuCode = skuCode;
    }

    public String getOrderDetailCode() {
        return orderDetailCode;
    }

    public void setOrderDetailCode(String orderDetailCode) {
        this.orderDetailCode = orderDetailCode;
    }

    public boolean isNotValid() {
        return notValid;
    }

    public void setNotValid(boolean notValid) {
        this.notValid = notValid;
    }
}
